﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ItemBank : MonoBehaviour
{
    public string[] subject = new string[50];
    public string[] optionA = new string[50];
    public string[] optionB = new string[50];
    public string[] optionC = new string[50];
    public string[] optionD = new string[50];
    public int[] answer = new int[] { 3, 2, 3, 3, 3, 2, 1, 4, 3, 1, 2, 3, 4, 3, 3, 1, 2, 4, 3, 1, 3, 3, 1, 2, 2, 2, 2, 1, 1, 3, 2, 2, 3, 1, 2, 3, 1, 2, 4, 3, 2, 2, 3, 4, 4, 2, 3 };
    int i = 0;
    // Start is called before the first frame update
    void Start()
    {
        SetUp();
    }

    void SetUp()
    {
        //概述
        subject[i] = "\u3000数据结构中与所使用的计算机无关的是数据的（）";
        optionA[i] = "A:存储结构";
        optionB[i] = "B:物理结构";
        optionC[i] = "C:逻辑结构";
        optionD[i] = "D:物理和存储结构";
        i++;
        subject[i] = "\u3000下列叙述中，错误的是（）";
        optionA[i] = "A:数据的存储结构与数据处理的效率密切相关";
        optionB[i] = "B:数据的存储结构与数据处理的效率无关";
        optionC[i] = "C:数据的存储结构在计算机中所占的空间不一定是连续的";
        optionD[i] = "D:一种数据的逻辑结构可以有多种存储结构";
        i++;
        subject[i] = "\u3000在数据结构中，从逻辑上可以把数据结构分成()。";
        optionA[i] = "A:动态结构和静态结构";
        optionB[i] = "B:紧凑结构和非紧凑结构";
        optionC[i] = "C:线性结构和非线性结构";
        optionD[i] = "D:内部结构和外部结构";
        i++;
        subject[i] = "\u3000数据在计算机存储器内表示时，物理地址与逻辑地址相同并且是连续的，称之为:";
        optionA[i] = "A:存储结构";
        optionB[i] = "B:逻辑结构";
        optionC[i] = "C:顺序存储结构";
        optionD[i] = "D:链式存储结构";
        i++;
        subject[i] = "\u3000可移植性最好的计算机语言是:";
        optionA[i] = "A:机器语言";
        optionB[i] = "B:汇编语言";
        optionC[i] = "C:高级语言";
        optionD[i] = "D:自然语言";
        i++;
        print(i);
        //线性表
        subject[i] = "\u3000一个向量（即一批地址连续的存储单元）第一个元素的存储地址是100，每个元素的长度为2，则第5个元素的地址是__。 ";
        optionA[i] = "A:110";
        optionB[i] = "B:108";
        optionC[i] = "C:100";
        optionD[i] = "D:120";
        i++;
        subject[i] = "\u3000线性表的顺序存储结构是一种__ _的存储结构，而链式存储结构是一种__  _的存储结构。 ";
        optionA[i] = "A:随机存取";
        optionB[i] = "B:索引存取";
        optionC[i] = "C:顺序存取";
        optionD[i] = "D:散列存取";
        i++;
        subject[i] = "\u3000线性表若采用链式存储结构时，要求内存中可用存储单元的地址__。 ";
        optionA[i] = "A:必须是连续的";
        optionB[i] = "B:部分地址必须是连续的";
        optionC[i] = "C:一定是不连续的";
        optionD[i] = "D:连续或不连续都可以";
        i++;
        subject[i] = "\u3000在以下的叙述中，正确的是__。";
        optionA[i] = "A:线性表的顺序存储结构优于链表存储结构";
        optionB[i] = "B:线性表的顺序存储结构适用于频繁插入 / 删除数据元素的情况";
        optionC[i] = "C:线性表的链表存储结构适用于频繁插入 / 删除数据元素的情况";
        optionD[i] = "D:线性表的链表存储结构优于顺序存储结构";
        i++;
        subject[i] = "\u3000不带头结点的单链表head为空的判定条件是____。";
        optionA[i] = "A:head == NULL";
        optionB[i] = "B:head->next == NULL";
        optionC[i] = "C:head->next == head";
        optionD[i] = "D:head != NULL";
        i++;
        subject[i] = "\u3000带头结点的单链表head为空的判定条件是____。";
        optionA[i] = "A:head == NULL";
        optionB[i] = "B:head->next == NULL";
        optionC[i] = "C:head->next == head";
        optionD[i] = "D:head != NULL";
        i++;
        subject[i] = "\u3000非空的循环单链表head的尾结点（由p所指向）满足____。";
        optionA[i] = "A:p->next == NULL";
        optionB[i] = "B:p == NULL";
        optionC[i] = "C:p->next == head";
        optionD[i] = "D:p == head";
        i++;
        subject[i] = "\u3000从一个具有n个结点的单链表中查找其值等于x结点时，在查找成功的情况下，需平均比较____个结点。";
        optionA[i] = "A:n";
        optionB[i] = "B:n / 2";
        optionC[i] = "C:(n - 1) / 2";
        optionD[i] = "D:(n + 1) / 2";
        i++;
        //栈和队列
        print(i);

        subject[i] = "\u3000一个栈的入栈序列a，b，c，d，e，则栈的不可能的输出序列是____。";
        optionA[i] = "A:edcba";
        optionB[i] = "B:decba";
        optionC[i] = "C:dceab";
        optionD[i] = "D:abcde";
        i++;
        subject[i] = "\u3000若已知一个栈的入栈序列是1，2，3，…，n，其输出序列为p1，p2，p3，…，pn，若p1=n，则pi为____。";
        optionA[i] = "A: i ";
        optionB[i] = "B:n=i ";
        optionC[i] = "C:n-i+1 ";
        optionD[i] = "D:不确定";
        i++;
        subject[i] = "\u3000栈结构通常采用的两种存储结构是____。";
        optionA[i] = "A:顺序存储结构和链式存储结构";
        optionB[i] = "B:散列方式和索引方式";
        optionC[i] = "C:链表存储结构和数组";
        optionD[i] = "D:线性存储结构和非线性存储结构";
        i++;
        subject[i] = "\u3000判定一个顺序栈ST（最多元素为m0）为空的条件是____。";
        optionA[i] = "A:top != 0";
        optionB[i] = "B:top == 0";
        optionC[i] = "C:top != m0";
        optionD[i] = "D:top == m0 - 1";
        i++;
        subject[i] = "\u3000判定一个顺序栈ST（最多元素为m0）为栈满的条件是____。";
        optionA[i] = "A:top！= 0";
        optionB[i] = "B:top == 0";
        optionC[i] = "C:top！= m0";
        optionD[i] = "D:top == m0 - 1";
        i++;
        subject[i] = "\u3000向一个栈顶指针为HS的链栈中插入一个s所指结点时，则执行__ __。 (不带空的头结点) ";
        optionA[i] = "A:HS—＞next = s;";
        optionB[i] = "B:s—＞next = HS—＞next; HS—＞next = s; ";
        optionC[i] = "C:s—＞next = HS; HS = s;";
        optionD[i] = "D:s—＞next = HS; HS = HS—＞next;";
        i++;
        subject[i] = "\u3000从一个栈顶指针为HS的链栈中删除一个结点时，用x保存被删结点的值，则执行__  __。(不带空的头结点)  ";
        optionA[i] = "A:x = HS; HS = HS—＞next;";
        optionB[i] = "B:x = HS—＞data;";
        optionC[i] = "C:HS = HS—＞next; x = HS—＞data;";
        optionD[i] = "D:x = HS—＞data; HS = HS—＞next;";
        i++;
        subject[i] = "\u3000一个队列的数据入列序列是1，2，3，4，则队列的出队时输出序列是____ 。";
        optionA[i] = "A:4，3，2，1";
        optionB[i] = "B:1，2，3，4 ";
        optionC[i] = "C:1，4，3，2  ";
        optionD[i] = "D:3，2，4，1";
        i++;
        subject[i] = "\u3000判定一个循环队列QU（最多元素为m0）为空的条件是____。";
        optionA[i] = "A:rear - front == m0";
        optionB[i] = "B:rear - front - 1 == m0";
        optionC[i] = "C:front == rear";
        optionD[i] = "D:front == rear + 1";
        i++;
        subject[i] = "\u3000判定一个循环队列QU（最多元素为m0, m0= =Maxsize-1）为满队列的条件是____。";
        optionA[i] = "A:((rear- front)+ Maxsize)% Maxsize = =m0";
        optionB[i] = "B:rear-front-1= =m0";
        optionC[i] = "C:front= =rear";
        optionD[i] = "D:front= = rear+1";
        i++;
        //串
        print(i);

        subject[i] = "\u3000串是一种特殊的线性表，其特殊性体现在：";
        optionA[i] = "A:可以顺序存储";
        optionB[i] = "B:数据元素是一个字符";
        optionC[i] = "C:可以链式存储";
        optionD[i] = "D:数据元素可以是多个字符";
        i++;
        subject[i] = "\u3000设有两个串p和q，求q在p中首次出现的位置的运算称作：";
        optionA[i] = "A:连接";
        optionB[i] = "B:模式匹配";
        optionC[i] = "C:求子串";
        optionD[i] = "D:求串长";
        i++;
        subject[i] = "\u3000串的长度是指（    ） ";
        optionA[i] = "A:串中所含不同字母的个数";
        optionB[i] = "B:串中所含字符的个数";
        optionC[i] = "C:串中所含不同字符的个数";
        optionD[i] = "D:串中所含非空格字符的个数";
        i++;
        subject[i] = "\u3000下面关于串的的叙述中，哪一个是不正确的？（）";
        optionA[i] = "A:串是字符的有限序列";
        optionB[i] = "B:空串是由空格构成的串";
        optionC[i] = "C:模式匹配是串的一种重要运算";
        optionD[i] = "D:串既可以采用顺序存储，也可以采用链式存储";
        i++;
        subject[i] = "\u3000若串S=“software”,其子串的个数是（）。";
        optionA[i] = "A:8";
        optionB[i] = "B:37";
        optionC[i] = "C:36";
        optionD[i] = "D:9";
        i++;
        subject[i] = "\u3000设有两个串p和q，其中q是p的子串，求q在p中首次出现的位置的算法称为（）";
        optionA[i] = "A:求子串";
        optionB[i] = "B:联接";
        optionC[i] = "C:匹配";
        optionD[i] = "D:求串长";
        i++;
        //数组
        print(i);

        subject[i] = "\u3000常对数组进行的两种基本操作是（    ） ";
        optionA[i] = "A:建立与删除";
        optionB[i] = "B:索引与修改";
        optionC[i] = "C:查找与修改";
        optionD[i] = "D:查找与索引";
        i++;
        subject[i] = "\u3000在以下讲述中，正确的是（ ）。 ";
        optionA[i] = "A:线性表的线性存储结构优于链表存储结构";
        optionB[i] = "B:二维数组是其数据元素为线性表的线性表";
        optionC[i] = "C:栈的操作方式是先进先出";
        optionD[i] = "D:队列的操作方式是先进后出";
        i++;
        subject[i] = "\u3000对矩阵压缩存储是为了（  ） ";
        optionA[i] = "A:方便运算";
        optionB[i] = "B:节省空间";
        optionC[i] = "C:方便存储";
        optionD[i] = "D:提高运算速度";
        i++;
        subject[i] = "\u3000稀疏矩阵一般的压缩存储方法有两种，即（  ）";
        optionA[i] = "A:二元数组和三元数组";
        optionB[i] = "B:三元组和散列";
        optionC[i] = "C:三元组和十字链表";
        optionD[i] = "D:散列和十字链表";
        i++;
        subject[i] = "\u3000一个向量第一个元素的存储地址是100，每个元素的长度为2，则第5个元素的地址是（  ）。 ";
        optionA[i] = "A:110";
        optionB[i] = "B:108";
        optionC[i] = "C:100";
        optionD[i] = "D:120";
        i++;
        subject[i] = "\u3000假设以行序为主序存储二维数组A=array[1..100，1..100]，设每个数据元素占2个存储单元，基地址为10，则LOC[5，5]= （   ）。 ";
        optionA[i] = "A:808";
        optionB[i] = "B:818";
        optionC[i] = "C:1010";
        optionD[i] = "D:1020";
        i++;
        //树
        print(i);

        subject[i] = "\u3000在一颗非空二叉树中，叶子节点的总数比度为2的节点总数多（     ）个";
        optionA[i] = "A:-1";
        optionB[i] = "B:0";
        optionC[i] = "C:1";
        optionD[i] = "D:2";
        i++;
        subject[i] = "\u3000在一棵完全二叉树中，其根的序号为1，（   ）可判定序号为p和q的两个结点是否在同一层。 ";
        optionA[i] = "A:│log2p」=│log2q」";
        optionB[i] = "B:log2p = log2q";
        optionC[i] = "C:│log2p」+1 =│log2q」";
        optionD[i] = "D:│log2p」=│log2q」+1";
        i++;
        subject[i] = "\u3000如果根的层次为1，具有61个结点的完全二叉树的高度为（   ） ";
        optionA[i] = "A:5";
        optionB[i] = "B:6";
        optionC[i] = "C:7";
        optionD[i] = "D:8";
        i++;
        subject[i] = "\u3000若二叉树的先序遍历序列为ABDECF，中序遍历序列DBEAFC，则其后序遍历序列为（ ） ";
        optionA[i] = "A:DEBAFC";
        optionB[i] = "B:DEFBCA";
        optionC[i] = "C:DEBCFA";
        optionD[i] = "D:DEBFCA";
        i++;
        subject[i] = "\u3000由权值为9,2,5,7的四个叶子结点构造一棵哈夫曼树，该树的带权路径长度为（   ） ";
        optionA[i] = "A:23";
        optionB[i] = "B:37";
        optionC[i] = "C:44";
        optionD[i] = "D:46";
        i++;
        subject[i] = "\u3000在线索化二叉树中，结点t没有左子树的充要条件是（    ）";
        optionA[i] = "A:t->lchild=null";
        optionB[i] = "B:t->ltag=1";
        optionC[i] = "C:t->ltag=1 且 t->lchild=null";
        optionD[i] = "D:以上都不对";
        i++;
        //图
        print(i);

        subject[i] = "\u3000采用邻接表表示一有向图，若图中某顶点的入度和出度分别为d1和d2，则该顶点对应的单链表的结点数为（ ） ";
        optionA[i] = "A:d1";
        optionB[i] = "B:d2";
        optionC[i] = "C:d1 - d2";
        optionD[i] = "D:d1 + d2";
        i++;
        subject[i] = "\u3000具有n（n>0）个顶点的无向图最多含有（  ）条边 ";
        optionA[i] = "A:n(n-1)";
        optionB[i] = "B:n(n+1)/2";
        optionC[i] = "C:n(n-1)/2";
        optionD[i] = "D:n(n+1)";
        i++;
        subject[i] = "\u3000一个具有n（n>0）个顶点的连通无向图至少有（    ）条边 ";
        optionA[i] = "A:n+1 ";
        optionB[i] = "B:n ";
        optionC[i] = "C:n/2  ";
        optionD[i] = "D:n-1";
        i++;
        subject[i] = "\u3000无向图G=(V,A)，其中V={a,b,c,d,e}，A={<a,b>,<a,c>,<d,c>,<d,e>,<b,e>,<c,e>}，对该图进行拓朴排序，下面序列中哪一个不是拓朴序列.（   ）";
        optionA[i] = "A:a,d,c,b,e";
        optionB[i] = "B:d,a,b,c,e";
        optionC[i] = "C:a,b,d,c,e";
        optionD[i] = "D:a,b,c,e,d";
        i++;
        subject[i] = "\u3000在对有向图G进行拓扑排序的目的不是（  ）。";
        optionA[i] = "A:判断G是否包含环";
        optionB[i] = "B:将G中所有顶点按大小关系排序";
        optionC[i] = "C:检查G表示的工序图是否合理";
        optionD[i] = "D:查看G中顶点所代表的活动的先后关系";
        i++;
        subject[i] = "\u3000在有向图G的拓扑序列中，若顶点Vi在顶点Vj之前，则下列情形不可能出现的是（    ）。   ";
        optionA[i] = "A:G中有弧 < Vi，Vj >";
        optionB[i] = "B:G中有一条从Vi到Vj的路径";
        optionC[i] = "C:G中没有弧<Vi, Vj>";
        optionD[i] = "D:G中有一条从Vj到Vi的路径";
        i++;
        print(i);

    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
